/*
 * @Description:
 * @Version: 1.0.0
 * @Author: gyh
 * @Date: 2021-08-07 13:44:19
 * @LastEditors: gyh
 * @LastEditTime: 2021-08-07 15:59:22
 */
interface Api {
  [prop: string]: any
}
const modules = import.meta.globEager('./modules/*.ts')
const api: Api = {}
Object.keys(modules).forEach(fileName => {
  const apiName = fileName.replace(/^\.\/modules\//, '').replace(/\.ts$/, '')
  api[apiName] = modules[fileName]
})

export default api
